frame filling bug fixed

the previous commit frame fill bug was fixed: I just had a copy and
paste issue. I also added some additional logic