bug fix reported by Lauri