fix stuffs and clean up