fixed some issues
Merge branch 'miscfix' into develop