Some compability fixes