Made some fixes