Fixed matplotlib initialization error