huge commit by Alfred, for FPC compatibility