Fix major bugs
Merge branch 'dev'