Fixed bug where wrong parameter was read