Fix for value types when it passed as generic parameter