fixing problem when pressing t