Fixed foreign key in assets
Fixed potential bug in blade