stopped hide controls being called twice when selecting an element