Added proper exceptions