Fix for several issues.