Small changes to fix some issues