Fixed bugs in spike drawing