minor fixes for type causing crashes