Compatability fixes