helper methods to prevent some fatal errors