IE substr() JS bug

'abcdefg'.substr(-2) = 

Abovementioned example should give 'fg' as output, IE gives 'abcdefg'