fixed reading of parameters