Fixed bug in clearFrame function