Fixed applications not being saved to db