Fixed incorrect use of for…in loop to enumerate arguments array.
Fixed a couple of nil value crashes