Sort of fixed some bugs.......