#152 #151 #150 fixes

Initial commit to fix these issues