Fixed bug (wrong condition on object type).