Fixes by aschamberger request