fixes return value issue