some small changes for stability