add some coins, and fix bug referenced in https://bitcointalk.org/index.php?topic=172121.msg2826282#msg2826282