fixes to a few magic methods