Some fixes!

Please, take a look on this commits.

Thanks.