resolved foreign key constraint issue in epg and null pointer exception was resolved in previous commit