#1 fixed bug with the required option