Fixed oversightted bugs