fixed secondclick bug