Minor tweaks for error detection