fixed browse button logic