fix js methods