fixing bug to delete pins