Change error handling for wrong params