EF Code First: fixed bugs