change instance variables to method calls

these instance variables are no longer available on Rails 4.  We should
use the accessor methods instead.