Sounds like you may have used Instant Desconstruction from a Creative Mode mod, and so the mining/deconstruction logic was not triggered.
You can remove these by hovering your cursor over each of the 3 rails and running the following command:
/c for _, e in pairs(game.player.surface.find_entities_filtered{position=game.player.selected.position}) do e.destroy() end