If passed as number mode gets converted to decimal, should be string

On Ubuntu 12.04 mode gets converted to decimal if not passed as string.