added fix to not sleep if last server