Last changes #2

Fixing some bugs