fixed makefile and improved previous fix

fixed makefile and improved previous fix, thanks to Admin…