Bug fixes.

Updated database definition.