Fix error and get some parameter sanity.