Fix setup function