Fixes makefile and SQL error.