addressing build errors due to optionals.

when built with these changes, it worked.