Shouldn't you do this check before you scroll?