make line removal work (wrong context inside the callback)