Some fixes for backwards compatibility