Fixes for #440
Added test case for #440
Fixes for #434
Merge branch 'trunk' of github.com:impetus-opensource/Kundera into trunk