fix premature return