Made sure code is in line with current version of gem