view logic bug fix