fix a bug, more bugs found...