clean up before building