Cakenumber fix squashed

Squashed the commits from https://github.com/cakephp/cakephp/pull/1520