image optimization and bug fixes