Fixed notices & errors thrown when global error catching is enabled