Fixed some bugs within the popUp and Machine Agents so that testing will work for the popUp