fixed some bugs

changed a few things