Fix bug in feature map creation