fixed bug with img reset