Bug/minor fixes