[fi] merged changes from Antti Loukialla