By moving it to the header of the code, the loop is now doing its work. Threfore, fixing the feature.