Fixed issue #5
Fixed issue #6
Fixed issue #11
Fixed issue #12
Fixed issue #13
Fixed issue #16