fixed enabling and disabling events
fixed memory leak from forgetting to call surface.PopMatrix()