OOIION-1482 and OOIION-1490
Merge pull request #97 from rajvikram/fix_1482_1490_rebase2

OOIION-1482 and OOIION-1490