add idea support and fix some issue