fixing race condition when selecting grid row