Finally got rid of compilation errors