Type hint violation fixed