bug fix with frames