better fix for serialization issues