Added optional unwrapping which caused compilation error