Fixed exception problem (missing variable $e)