final bug fixes to cs app