Fix another memory buggie caused by wrong type.