fixed some stupid bugs