fixes #297 and #107 input alignment on error