js toggleread bugfix