V1.1 Bug Fixes

Fixed some bugs and added error handling.