Stamina library: bugfix