Fixing dropdown menu bug