Fixed small bugs.

Today is one of those days I feel the 1.5 years invested into this
thing are wasted. :’(