Bug fixes for Lab 1