Bug with monitor

The monitor was breaking due to the code expecting to use a string but in turn getting a undefined value.