bug fix, check that bitmap is ready before drawing