Particle bugfixes

Added a sanity check to the particle code. Also fixed a bug where
particles weren't cleared between maps.