IMG not working for dynamically created images