apply fix as suggested by @dmbelov