Fixed unwrapping of optional