Fix delayed jobs infinite loops