fix bugs to make ccache work