Disclosed in certain embodiments is an immediate release solid oral dosage form comprising a plurality of particles, each particle comprising: (i) a core comprising an inert excipient and an active agent, wherein the inert excipient is layered with the active agent; and (ii) a material that is sensitive to acidic pH layered on the core; wherein the plurality of particles are dispersed in a matrix comprising a gelling agent; and wherein the dosage form releases at least about 70% of the active agent within 45 minutes as measured by in-vitro dissolution in a USP Apparatus 2 (paddle) at 50 rpm in 500 ml 0.1N HCl at 37° C.