Ticket 47, applied patch with last suggested change by Jeff (moving setting of "initialization"-flag).