Fix for "undefined method ..." errors