fix train forward and back in firefox