Improved fix for #24: Multiple levels of complex properties

I improved steven's fix to also allow multiple levels.