bug fix 1

fixed patch and require once bugs