Fixed problem in computing parameters