Last fixes, I found a math error which was causing mapping to be
really screwed up.