Fix #17 - Pattern restrictions not correctly applied.