Added torrent open handlers. Fixed a typecast.