Fix compilation errrors