fix some smaller bugs