minor fixes and a null pointer exception on type filter