minor bug fixes, now Go 1.1 compatible