Changed validation per @Maks3w suggestion