Fixing 2.7 compatability issues