fix possible exceptions if there are timing issues
avoid unnecessary dependency