Made clickedbefore better