Remove image blinking and improve security