Fixed a bug and backward compatibility check for lsb functions