If this is the situation, you probably have a poor connection (cold solder joint, faulty connector, dirty contacts, etc.), most likely in that jack (I am assuming you mean the instrument jack when you say plug). It may be fixed by contact cleaner, replacing a jack, or re-flowing a solder joint...