fixed a bug in `create' method, covered with testcases