fixed bug showing error message for compare