fixes for debug (hw9, task 2)