Updated Makefile and fixed small bug.