Fixes non-serializatble errors