correction on loop