Fixed some problems
Merge branch 'dev'