Ran tests an fixed minor problems