Small bugfixes that prevented the program either to compile or to run properly.