Fixing issue #144
Fixing issue #145
Fixing issue #146