Fixed reordering of js