fixed many bugs

still needs a constant framerate in the Update thread