Don't assume script types are 4 characters long.

Lazy fix.