Solved few bugs