Fixed linker errors and fixed for empty options case