Firms prosecuted over gate death