Minor fixes to make it compilable