Closes #5144 Patch by Grant Edwards <grant.b.edwards@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>