fixed some smaller bugs