Adding Application Type and bug fix