Fix for horrible bug in type handling (getProperty called on the wrong property name... sigh).