adding rem bug fix