fixing value type handling