Fixed code to the compilable state