What's the best glue for console carpet surround?

I used contact cement but it started coming off and didn't fit as well in the corners as I liked. Ended up using push pins. since the carpet is dark blue and black push pins, you cannot see them and it holds it up well. If i need to take it off, just pull the pins.