Fixed crash on unexpected return