Fixing last srcElement (wont work on firefox)