fixing require bug