Fixed compilation errors - no idea why VS compiled it ok previously :(