Added extra security checks to change position callback