BUGFIX: more safety checks when turning the framebuffer into a string
BUGFIX: Removed trailing comma which defined a JSON null value where none was suppose to be.