fixed smalkl bugs