Fix map protocol handler and makefile