bug fixes in Lab 1