fix multiple returns
author: quan1992