Some compatability fixes