Improved type handling.