Fixed a compliation problem in one of the tests and a null pointer when executing from command line