TEST VERSION
Several bugs fixed