fix error when nothing returns