fixed small issues with init function and others
fixed merge conflict