Issues #43, #44, #45

Fixes for issues #43, #44, #45