An investigation has been launched into how to prevent similar incidents in future.