fix type casting bug introduced in 03fde5f