fix bugs with imgs