Fix issue when no apps are enabled

Properly initialize $apps array