bunch of little fixes