fix for casting issue