bug fix with scanner