fixed errors in prepareRepo and handling of empty options parameter