Maybe have fixed some bugs