Fixed bug related to FrameBuffer width/height goes out of date.

Fixes #1129