Fixed a couple bugs discovered during making wallet