fix indentation and only do colored rect if no image is present