(Hopefully) last fixes.

Thanks to @dhpollack for the help :)