prevent nullpointer and updated default props