fixing compile-time errors