fixed nasty bug in library execute