added changes to make signal handling work in django 1.7