fix issues pointed by Ben