detect conflict

minor bugs