Bug fix

Fixed a couple errors.