The present invention refers to a modified release pharmaceutical composition comprising an in-situ gelling agent (=0.5 % w/w) and a gellation facilitating agent (e.g. calcium sulfate) in an amount of 2-17.5 % w/w. Additionally, the composition contains a release rate controlling polymer such as an acrylate and optionally a pH independent rate controlling polymer such as HPMC. A preferred active agent is mycophenolate mofetil. A process of making the above described composition is also disclosed.