Small bug fixes.
Fixes #187
Fixes #186
Fixes #184
Fixes #183

<<<<<<< Local Changes
=======
>>>>>>> External Changes
<<<<<<< Local Changes
=======
>>>>>>> External Changes