Bug fixes, better support for images