Fixed some problems in lab6