fixed learning contract bug
fixed issue #14