fix display bug in analysis mode
tweaked spike detection