corrected bugs here and there