fixed function createFinalImg