Properly initialise and cast array properties
Merge pull request #4 from nkm/master

Properly initialise and cast array properties