fix so that it can be compiled with Makefile