Adding stupid guards to avoid errors.

Stuff is sometimes half-baked; adding braindead guards to prevent
execution at the wrong time.