diff --git a/docs/libplanner/Makefile.am b/docs/libplanner/Makefile.am
index d4d655d..51b6f1f 100644
--- a/docs/libplanner/Makefile.am
+++ b/docs/libplanner/Makefile.am
@@ -10,7 +10,7 @@ DOC_MAIN_SGML_FILE=libplanner-docs.sgml
 DOC_SOURCE_DIR=../../libplanner
 
 # Extra options to pass to gtkdoc-scangobj
-SCANGOBJ_OPTIONS=--type-init-func="g_type_init()" 
+SCANGOBJ_OPTIONS=
 
 # Extra options to supply to gtkdoc-scan
 #SCAN_OPTIONS=--deprecated-guards="GTK_ENABLE_BROKEN|GTK_DISABLE_DEPRECATED" 
diff --git a/src/Makefile.am b/src/Makefile.am
index 7191da2..538583b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -125,6 +125,8 @@ libplannerapp_la_SOURCES = 			\
 	$(resource_source)		\
 	$(usage_source)
 
+libplannerapp_la_LIBADD = -lm
+
 gantt_task_source = 			\
 	planner-gantt-background.c	\
 	planner-gantt-background.h	\
diff --git a/tests/calendar-test.c b/tests/calendar-test.c
index fa8c4ba..ac77200 100644
--- a/tests/calendar-test.c
+++ b/tests/calendar-test.c
@@ -17,8 +17,6 @@ main (gint argc, gchar **argv)
         MrpDay         *day_a, *day_b, *day_c, *def_1_id;
         GList          *l = NULL;
 
-        g_type_init ();
-
 	app = mrp_application_new ();
 
 	project = mrp_project_new (NULL);
diff --git a/tests/cmd-manager-test.c b/tests/cmd-manager-test.c
index 6b463b0..863b1c4 100644
--- a/tests/cmd-manager-test.c
+++ b/tests/cmd-manager-test.c
@@ -119,8 +119,6 @@ main (gint argc, gchar **argv)
 {
 	ActionHistory action_history;
 
-        g_type_init ();
-
 	PlannerCmdManager *cmd_manager = planner_cmd_manager_new ();
 
 	/* Initialise the action history */
diff --git a/tests/scheduler-test.c b/tests/scheduler-test.c
index ec185de..4bdab4b 100644
--- a/tests/scheduler-test.c
+++ b/tests/scheduler-test.c
@@ -227,8 +227,6 @@ main (gint argc, gchar **argv)
 		NULL
 	};
 
-        g_type_init ();
-
 	app = mrp_application_new ();
 
 	i = 0;
diff --git a/tests/task-test.c b/tests/task-test.c
index ab9c191..b93c9d8 100644
--- a/tests/task-test.c
+++ b/tests/task-test.c
@@ -21,8 +21,6 @@ main (gint argc, gchar **argv)
 	MrpTask        *root;
 	MrpRelation    *relation;
 
-        g_type_init ();
-
 	app = mrp_application_new ();
 
 	project_start = mrp_time_from_string ("20020218", NULL);
