Fixed casting numbers and blocks under ifs not running

* fixed strings not being casted to numbers in many blocks
* fixed blocks directly under if blocks not running

Tested with projects 13841687 and 2192048.