fix many bugs(sorry, I completely forgot them....)
Merge branch 'master' of https://github.com/fumihito/core-prep