fixed the delete issue

sadly,  i only had to swap lines 289 and 290 to fix the problem -_-