Fix some errors when setting up keys and remove options that are not needed.