Fix problem when showing warning