Fixed type restriction bug