fix AE mode, return errors and stuff