Cleans up the error block to stop keys AND values appearing as list items