Fix UIImage cost calculation