Fixed severe compilation issues