fix some compile errors. It's so late