bugfix no return at end of nonvoid function