I could reinline this if performance is critical.