Fixing compile bugs