learning engine fixes