Fixed a nasty bug

I really need treat warnings as errors.