Previous changes caused buggy bahaviour. Partial roll-back