Should fix loop errors