FIXED: Fix a few bugs.