fixed smaller bugs