Fixes bug from previous Perfomance tuning patch Submitted by: Henrik Olsson <henrik.olsson@intentia.se>