Solved by Canurd in post #8 
              
              
                Hi 
Sry for the late reply. I’ve found out that the bug is caused by me not carrying out any operations on the created weight (a mispositioned line of code) and I’ve fixed it. Thank you very much!