Fix parser constructor and destructor (null ref)