Rails4 compatiblity, fixes #3