finally actually fix bugs