Fixes bugs 1101482 and 1101481
Fixes bugs 1101414 and 1101413