Bug fix. Clean up