Fix issue with hpregen in command_npcedit