fixed bad isHandling check and added to tests