Fix for 1356: Memory settings can overflow without warning