make sure params is set before init