Fixed errors so it compiles