Fixed linux cycle issues and linux Makefile