Make the preview method actually return the errors string

Fix an issues in both the code and tests caused by me not running
the test.