chapter attribute fixes and js adjustments with 'done' and 'current' states