fix rotues check when loop is active