Fix cancel button and scan