fixed init code