Fix for MAGN-174 and MAGN-176

Fix for MAGN-174 and MAGN-176