Fixed a bug affecting the 'type' property