Undo the wrong changes and made the correct ones

Now fixes made in right places