fixed wonky image handling