Some fixes for future 5.0.1 release