Bug fix
First functional version