fix js position bugs