Small changes and bug fixing