Fixes to processing of RAS images