fixed stupid bugs