Simple bugfixes and silly mistakes all around.