fixed some bugs and shit