check before return fix