Fix some compatability stuff