Fixed issue reported by Andriy Rakhnin