Hacked together fixes