fixing bug with clicking to show coordinates