added some missing semicolons etc