fixed some requires bugs