Bug fixes, code not produces PNG output.