fix & error handling