Fixing arithmetic error that was causing the huge offset on diamond mapping