Improved slice type handling.