fixed bugs in places
Merge remote-tracking branch 'origin/master'