More code tweaks
Setting an extra init variable to prevent error on first use.