fixed input bugs + fixed mouse bug