fix reg3 and makefile