Fixed to work with jQuery