fixed bug in sls-mode