Fixed some bugs in the Makefile
Bumped version number to 1.3.1