Fixed double application-context problem, which messed up the database