Fixed some drawbacks