bug fixing for add button