Adjusted to work with Isabelle 2014