fixd a bug where the variable frame was empty causing an exception