fixes some "control reaches end of non-void function" warnings