fix try logical error