fix potential lock leak
fix recent regression which meant we locked way too much
remove debug lines
Fix issues with Numbers as Strings in maths (eg. '-5'|0)