Fix makefile am bugs