fixed some bugs, but bugs still..