minor bug fix with delete statment