Fixed foreign key NULL value