fixing select code to account for scroll offset.