several bugs resolved