Fixed the bug from Dojo 1.x (yet incomplete).