fix javascript bug for delivieries