Update castle return hack to more elegant solution