fix for crop template and issues with large images