Prevented unnecessary code running on timeout