fix bunch of stuffs