Fixed bug with a deriving a types of arguments for reference types.