Don't use tomes when right clicking on containers, don't use the whole stack of tomes if there are more than 1, fix compile error.