Consider number of available instances in deas before starting app.

removed changes made to white spaces