added minor patches to bypass build errors
Tested makefile