fix validation bug that was introduced in ec7be61 + add test