Bug fixes

A few silly bugs