prevent infinite submit loop