Removes the require_once and fixes a bug