Update code and fix png errors