Update Lab1.scala

Fixed some cases causing test failures.