Resolved a few bugs.