Updated version fixing some bugs