Fixed #15. Fixed boolean validate method