Fixed problem with this in js