Bug Fixes

Various Bug Fixes