Bug fix for init