small tweaks to make it stable