validation fixes for #188 and #169