fix of #498, #493, #494 - because disappeared in last commit