fixed some more stupid bugs