fixed return errors