made the most obvious and quickest bug fixes