Fixed a few quantum issues