Fixed bug with missed condition on by ref type arguments