Added safety check for BIB_FORMAT before trying to slice it. Fixes #279