fix broken validation. Close #4.