You can either find a nook in the rocks to stick it, which I prefer or you can use gel super glue to reglue it onto the plug or directly to the rockwork.
I prefer the nook method because I often reaquascape as things grow and having them glued down makes that difficult.