Fixed a bug with value type.