Fixed a bug in Hakit.set, added tests for it.