fixed the parameters for putFrame()