fixes undefined record in select event