Minor bug cleanup