FIXED: bug caused by incorrect sequence of callbacks